<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>

        var right=0;
        var left=0;
        var timer;
        function $(id){
            return document.getElementById(id);
        }
        window.onload=function(){
            $("start").onclick=()=>{
                $("start").disabled=true;//禁用开始按钮
                $("stop").disabled=false;//启用停止按钮
                timer=setInterval(run,100);

            };
            $("stop").onclick=()=>{
                $("start").disabled=false;//启用开始按钮
                $("stop").disabled=true;//禁用停止按钮
                clearInterval(timer);
            };
        };

        function run(){
            right++;
            if(right>9){
                right=0;
                left++;
            }
            if(left>9){
                right=0;
                left=0;
            }
            $("logo2").src=`number/${right}.bmp`;
            $("logo1").src=`number/${left}.bmp`;
            


        }
    </script>
</head>
<body>
    <div>
        <img src="number/0.bmp" alt="" id="logo1">
        <img src="number/0.bmp" alt="" id="logo2">
    </div>
    <div>
        <input type="button" value="开始" id="start">
        <input type="button" value="停止" id="stop">
    </div>
</body>
</html>